#include<stdio.h>
#include<stdlib.h>
typedef struct {
    int lineno;   
    int Uppers;   
    int Lowers;   
    int Numbers;  
    int Separators;
    int Others;    
}LineInfo,*PLineInfo;
int GetLineInfo(FILE *fp,PLineInfo li);
int main()
{
FILE *fp;
PLineInfo li;
li->Uppers=0;
li->Lowers=0;
li->Numbers=0;
li->Separators=0;
li->Others=0;
scanf("%d",&li->lineno);
fp=fopen("test.txt","r");
if(fp==NULL)
{
exit(EXIT_FAILURE);
}
GetLineInfo(fp,li);
printf("%d %d %d %d %d",li->Uppers,li->Lowers,li->Numbers,li->Separators,li->Others);
fclose(fp);
return 0;
}
int GetLineInfo(FILE *fp, PLineInfo li)
{
char ch;
int num=0;
ch=fgetc(fp);
num=li->lineno;
while(li->lineno!=1&&ch!=EOF)
{
    ch=fgetc(fp);
    if(ch=='\n')
{
   li->lineno--;
}
}
if(num!=1)
{
ch=fgetc(fp);
}
while(ch!='\n'&&ch!=EOF)
{ 
   if(ch>='A'&&ch<='Z')
{
  li->Uppers++;
}
else if(ch>='a'&&ch<='z')
{
 li->Lowers++;
}
else if(ch>='0'&&ch<='9')
{
  li->Numbers++;
}
else if(ch=='\t'||ch=='\n'||ch==' '||ch==','||ch==';'||ch=='.')
{
li->Separators++;
}
else
{
li->Others++;
}
ch=fgetc(fp);
}
return 0;
}


